package com.context;

import org.springframework.context.ApplicationContext; 

/**
 * @author zyl
 *
 */
public class SpringContainer implements Container{
    private ApplicationContext applicationContext;
    /* (non-Javadoc)
     * @see com.anyweb.context.Container#getComponent(java.lang.String)
     */
    public Object getComponent(String name) {
        return applicationContext.getBean(name);
    }
    
    /**
     * @return Returns the applicationContext.
     */
    public ApplicationContext getApplicationContext() {
        return applicationContext;
    }
    /**
     * @param applicationContext The applicationContext to set.
     */
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    /* (non-Javadoc)
     * @see com.anyweb.context.Container#reload()
     */
    public void reload() {
        
    }
}
